#include <config.h>

#include <stdio.h>
#include <stdlib.h>

void
usage(int e)
{
	if (e == EXIT_SUCCESS)
		fprintf(stdout, "Usage: " PACKAGE " [options] [port]\n"
			"Options:\n"
			"    -4\tUse IPv4\n"
			"    -6\tUse IPv6\n"
			"    -h\tThis help text\n"
			"    -v\tPrint version number\n\n"
			"Report bugs to <" PACKAGE_BUGREPORT ">.\n");
	else
		fprintf(stderr, "Usage: " PACKAGE " [-46v] [port]\n");

	exit(e);
}

void
version(void)
{
	printf(PACKAGE_STRING);
	printf("\nWritten by Summer Town.");
	printf("\nBuild date: " __DATE__ " " __TIME__ "\n");
}
